Enable loopback disk image files on readonly nfs filesystem.
authorKeir Fraser <keir@xensource.com>
Wed, 7 Nov 2007 09:22:31 +0000 (09:22 +0000)
committerKeir Fraser <keir@xensource.com>
Wed, 7 Nov 2007 09:22:31 +0000 (09:22 +0000)
commitb2f3f8e649645dc699129dbe46fe6b9112aee105
tree1882b19a47ad30879a9b79408858593edf9a1122
parent78a146f3c3dc9c4b563e6cfed16a31a085a89859
Enable loopback disk image files on readonly nfs filesystem.

When we losetup a file on readonly nfs filesystem, it fails with:
# losetup /dev/loop7 /data/vm/xen_el5_i386_para/system.raw
/data/vm/xen_el5_i386_para/system.raw: Permission denied

New version of losetup has add a "-r" option for readonly loop, which
Linux kernel has supported for a long time. Some distribution (EL5
update, Fedora 8, etc.) have shipped it. This patch benefit this
option while doesn't break the old versions of losetup.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
tools/examples/block